import { CLR_SET_TABLE_DATA, CLR_CHANGE_TABLE_LOADING, CLR_SET_SOURCE_DATA } from './actions';


const initState = {
    loading: false,
    data: {
        data:[],
        pagination: {},
    },
    sourceData: []
}

const channelLdzhReport = (state = initState, action) => {
    switch (action.type) {
        case CLR_SET_TABLE_DATA:
            return { ...state, data: action.data };
        case CLR_CHANGE_TABLE_LOADING:
            return { ...state, loading: action.option };
        case CLR_SET_SOURCE_DATA:
            return { ...state, sourceData: action.data };
        default:
            return state;
    }
}
export default channelLdzhReport;